home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
pas_all.zip
/
TI457.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
6KB
|
265 lines
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
VERSION : 4.0
OS : PC-DOS
DATE : January 3, 1990 PAGE : 1/4
TITLE : LINKING ERROR.MSG AND FONT FILES
This technical information handout describes how to link in the
ERROR.MSG, 4x6.FON, 8x8.FON and 14x9.FON files into your *.EXE
file so that your application no longer needs these files to be
present on disk. Please make these changes to copies of your
GRAF3270.DVR GRAFEGA.DVR ERROR.MSG 14X9.FON
GRAFATT.DVR GRAFHGC.DVR 4X6.FON GDRIVER.PAS
GRAFCGA.DVR GKERNEL.PAS 8X8.FON
First, you must convert the ERROR.MSG, 4x6.FON, 8x8.FON, and
14x9.FON files to the OBJ format.
Use the BINOBJ.EXE utility to convert these files to the OBJ
format.
For example,
BINOBJ ERROR.MSG ERROR.OBJ FakeErr <Return>
BINOBJ 4x6.FON 4x6.OBJ Font4x6 <Return>
BINOBJ 8x8.FON 8x8.OBJ FakeFont <Return>
BINOBJ 14x9.FON 14x9.OBJ FakeFont <Return>
Next, delete the first 13 lines of code from the procedure
EnterGraphic in each of the *.DVR and GDRIVER.PAS files with the
exception of GRAFATT.DVR file. In the GRAFATT.DVR file, delete
the first 15 lines of code instead. Also, in the GRAFCGA.DVR file
s
{$L 14x9} { ADD }
procedure FakeFont; external; { ADD }
procedure EnterGraphic;
{ Enter graphics mode }
...
...
begin
if not FontLoaded then { ADD }
begin { ADD }
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
VERSION : 4.0
OS : PC-DOS
DATE : January 3, 1990 PAGE : 2/4
TITLE : LINKING ERROR.MSG AND FONT FILES
Move(Mem[Seg(FakeFont):Ofs(FakeFont)], Font, SizeOf(Font));
{ADD}
FontLoaded := true; { ADD }
end; { ADD }
....
.....
The rest of the EnterGraphic procedure remains the same.
The following changes should be made in the GKERNEL.PAS unit:
{$L 4x6 } {NEW}
procedure Font4x6; external; {NEW}
{$L Error} {NEW}
procedure FakeErr; external; {NEW}
procedure InitGraphic;
var
Fil : file of CharArray;
Tfile : text;
Test : ^integer;
Temp : WrkString;
I : word;
GTBCount : integer; {NEW}
GTBch : char; {NEW}
Function ErrorStr : WrkString; {NEW}
begin {NEW}
temp := ''; {NEW}
repeat {NEW}
GTBch := chr(mem[Seg(FakeErr):Ofs(FakeErr) + GTBcount]);
if not ((GTBch = #10) or (GTBch = #13)) then {NEW}
temp := temp + GTBch; {NEW}
inc(GTBcount); {NEW}
until(GTBch = #13); {NEW}
ErrorStr := temp; {NEW}
end; { Function ErrorStr } {NEW}
begin
MessageGlb := true;
BrkGlb := false;
GrafModeGlb := false;
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
VERSION : 4.0
OS : PC-DOS
DATE : January 3, 1990 PAGE : 3/4
TITLE : LINKING ERROR.MSG AND FONT FILES
GotoXY(1, 1);
if not HardwarePresent then
begin
ClrScr;
GotoXY(1, 2);
WriteLn('Fatal Error: graphics hardware not found or not
properly activated');
Halt;
end;
GetMem(ErrorProc[0], 16);
GetMem(ErrorCode[0], 24);
ErrorProc[0]^ := 'InitGraphic';
ErrorCode[0]^ := 'Error.MSG missing';
GTBcount := 0; {NEW}
for I := 0 to MaxProcsGlb do {MODIFIED}
begin
Temp := ErrorStr; {NEW}
if I <> 0 then
GetMem(ErrorProc[I], Length(Temp) + 1);
ErrorProc[I]^ := Temp;
end;
for I := 0 to MaxErrsGlb do {MODIFIED}
begin
Temp := ErrorStr; {NEW}
if I <> 0 then
GetMem(ErrorCode[I], Length(Temp) + 1);
ErrorCode[I]^ := Temp;
end;
PcGlb := ErrorStr; {MODIFIED}
for I := 1 to MaxWorldsGlb do
DefineWorld(I, 0, 0, XScreenMaxGlb, YMaxGlb);
MaxWorldGlb := 1;
for I := 1 to MaxWindowsGlb do
begin
DefineWindow(I, 0, 0, XMaxGlb, YMaxGlb);
with Stack[I] do
begin
W.Size := 0;
Contents := nil;
end;
end;
MaxWindowGlb := 1;
Move(mem[seg(Font4x6):ofs(Font4x6)],CharSet,Sizeof(CharSet));
PRODUCT : TURBO PASCAL GRAPHIX TOOLBOX NUMBER : 457
VERSION : 4.0
OS : PC-DOS
DATE : January 3, 1990 PAGE : 4/4
TITLE : LINKING ERROR.MSG AND FONT FILES
{NEW}
Delete the next 12 lines of code.
The rest of the code remains the same in the GKERNEL.PAS unit.
BrkGlb := True;
If RamScreenGlb Then
...
...
****************************************************************
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.